import { getTreeList } from '@/api/exam/question'
const state = {
  treeList: []
}
const getters = {
  treeList: state => state.treeList
}

const mutations = {
  SETTREELIST(state, data) {
    state.treeList = data
  }
}

const actions = {
  async loadTreeList({ commit }) {
    const { data } = await getTreeList()
    console.log(data)
    commit('SETTREELIST', data)
  }
}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
